package com.chenjun.core.service.oa.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.chenjun.common.model.DataGridModel;
import com.chenjun.core.dao.generator.entity.OaDictSeasonCfg;
import com.chenjun.core.dao.generator.mapper.OaDictSeasonCfgMapper;
import com.chenjun.core.service.oa.OaDictSeasonCfgService;

@Service
@Transactional
public class OaDictSeasonCfgServiceImpl implements OaDictSeasonCfgService{

	@Autowired
	private OaDictSeasonCfgMapper oaDictSeasonCfgMapper;
	
	@Override
	public OaDictSeasonCfg get(int id) {
		return oaDictSeasonCfgMapper.selectByPrimaryKey(id);
	}

	@Override
	public int create(OaDictSeasonCfg oaDictSeasonCfg) {
		return oaDictSeasonCfgMapper.insert(oaDictSeasonCfg);
	}

	@Override
	public int delete(String id) {
		return oaDictSeasonCfgMapper.deleteByPrimaryKey(Integer.valueOf(id));
	}

	@Override
	public int update(OaDictSeasonCfg oaDictSeasonCfg) {
		return oaDictSeasonCfgMapper.updateByPrimaryKey(oaDictSeasonCfg);
	}

	@Override
	public List<OaDictSeasonCfg> doListByCondition(DataGridModel param) {
		return oaDictSeasonCfgMapper.selectByCondition(param);
	}

}
